<?php
/**
 * Extdb
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://code.google.com/p/extdb/wiki/NewBSDLicence
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Extdb
 * @package    Extdb
 * @copyright  Copyright (c) 2005-2008 ExtDb. (http://code.google.com/p/extdb/)
 * @license    http://code.google.com/p/extdb/wiki/NewBSDLicence New BSD License
 * @version    $Id: bootstrap.php 15 2009-07-29 21:45:57Z luke.richards.99 $
 */
define('EXTDB_ROOT_PATH', realpath(dirname(__FILE__) . '/..'));
defined('EXTDB_APP_ENV')
    || define('EXTDB_APP_ENV',
              (getenv('EXTDB_APP_ENV') ? getenv('EXTDB_APP_ENV')
                                         : 'production'));

set_include_path(EXTDB_ROOT_PATH . '/library' .
    PATH_SEPARATOR . get_include_path());

require_once 'Zend/Loader/Autoloader.php';
$loader = Zend_Loader_Autoloader::getInstance();
$loader->registerNamespace('Extdb');

$config = new Zend_Config_Ini(
    EXTDB_ROOT_PATH . '/config/application.ini',
    EXTDB_APP_ENV
);
Zend_Registry::set('config', $config);